Network communication apparatus, method and program

ABSTRACT

The present invention filters packets and reduces traffic when communication is performed with a device on a network utilizing the IPv6 protocol. To achieve this, a printer driver operating in a personal computer correlates and stores the name of the communicating party and an address for which communication actually succeeded from among addresses that have undergone name resolution, and uses the stored address in communicating with the same communicating party from then onward.

TECHNICAL FIELD

The present invention relates to a communication function that operatesin a personal computer, for example, for communicating with a device ona network. In particular, the invention relates to a communicationfunction that utilizes IPv6 (Internet Protocol Version 6) as thecommunication protocol.

BACKGROUND ART

In response to the ongoing exhaustion of addresses available with thecurrent Internet protocol (IPv4), IPv6 has started to come intopractical use as a next-generation Internet protocol improved to enlargeaddress space, provide additional security and transmit data inaccordance with priority. The specifications of the IPv6 protocol aresuch that a plurality of addresses are can be allocated to a singlenetwork interface. For example, a link local unicast address (referredto as a “link local address” below) and a global unicast address(referred to as a “global address” below) are known as addresses thatcan be allocated. Furthermore, since a plurality of addresses can beallocated as global addresses, there are cases where an IPv4 address anda plurality of IPv6 addresses are registered with respect to a singlehost in a DNS (Domain Name System) server.

An FQDN (Fully Qualified Domain Name) usually referred to as a “name” isin use in order to identify a communicating party. It should be notedthat an FQDN is a host name or domain name indicated from a root alongthe hierarchical structure of a DNS domain. An FQDN will be referred tosimply as a “name” below. When a DNS server is queried about a binaryaddress by designating a name, there are instances where a plurality ofIPv6 addresses are acquired. It is not necessarily possible for all ofthese addresses to be reached from the personal computer that was thesource of the inquiry. In TCP communication using IPv6, an attempt ismade sequentially to connect to a plurality of addresses obtained as theresult of name resolution using the DNS and the address prevailing atthe moment a connection succeeds is used as the party's address. WithUDP (User Datagram Protocol) communication using IPv6, an applicationmust verify reachability by using a method such as packet resend withrespect to a communicating party. Accordingly, in essentially the sameway as TCP communication, an attempt must be made to transmit a packetto a plurality of addresses in sequential fashion. Thus, IPv6communication invites an increase in network traffic and trial timeuntil a connection is established, these essentially being attendantupon the fact that a plurality of addresses are used.

Similarly, a plurality of addresses exist also as local addressesopposite an address of a communicating party. When the address of acommunicating party is decided, the local address corresponding to thisaddress is selected in accordance with an algorithm defined as RFC 3484[“Default Address Selection for Internet Protocol version 6 (IPv6)”].Since this address selection algorithm is executed within a program,usually referred to as a “protocol stack”, which is nearly an operatingsystem, an application program cannot participate in relation to thelocal address selected.

Owing to the fact that a plurality of IPv6 addresses exist for each oftwo communication end points, the situation described below arises in acase where communication using the UDP protocol in particular is carriedout. Assume that communication end points A and B each have three oftheir own IPv6 addresses and that these are Addr_A1, Addr_A2, Addr_A3and Addr_B1, Addr_B2, Addr_B3, respectively. Assume that among theaddresses possessed by communication end point B, the two addressesAddr_B1 and Addr_B2 have been registered with the DNS.

In a case where communication end point A starts communicating withcommunication end point B, as illustrated in FIG. 3A, firstcommunication end point A designates the name of communication end pointB (here the name will be “communication end point B”) and requests(queries) the DNS server for name resolution. The DNS server sends back(responds with) the two addresses (Addr_B1 and Addr_B2) as the result ofname resolution.

The communication end point A that has received the result of nameresolution transmits a request to Addr_B1 and reaches the communicationend point B. The communication end point B sends back a responsecorresponding to the request. At this time, however, the communicationend point has ascertained that Addr_A1 is the address at the source oftransmission of the request and therefore it sends back its response tothis address. When this is done, the address selection algorithm definedin RFC 3484 mentioned above functions and there are instances whereAddr_B3 rather than Addr_B1 is selected as the optimum address fromamong the three addresses possessed by communication end point B. Thus,the response from communication end point B is sent from Addr_B3 toAddr_A1 of communication end point A. Thus a situation arises in which,from the standpoint of communication end point A, data is sent to itfrom an unknown address.

There are instances where, if it has been confirmed that the party towhich the communication end point A sent the request is only thecommunication end point B, then the data from the unknown address can bedetermined to be a response sent from communication end point B.However, it will be understood that this determination is not possibleif consideration is given to a case where, as shown in FIG. 3B,communication end point A sends requests to the two parties atcommunication end points B and C substantially simultaneously. Assumethat the addresses of communication end points A, B and C in FIG. 3B areAddr_A1, Addr_A2, Addr_A3; Addr_B1, Addr_B2, Addr_B3; and Addr_C1,Addr_C2, Addr_C3, respectively. Furthermore, assume that those addressesamong the addresses of communication end point B that have beenregistered with the DNS server are Addr_B1 and Addr_B2, and that suchaddresses of the communication end point C are Addr_C1 and Addr_C2.Assume also that the communication end point A queries the DNS serverregarding the names of the communication end points B and C and that itreceives two addresses per end point as responses. Here thecommunication end point A sends requests to the communication end pointsB and C, the communication end point B sends a response from Addr_B3 toAddr_A1, and the communication end point C sends a response from Addr_C3to Addr_A1.

The communication end point A thus receives data from the unknownaddresses Addr_B3 and Addr_C3. The communication end point A cannotdetermine from which of the communication end points B and C these twoitems of data have been received as response data. In the case of aprotocol such as IPv4 in which a response can always be expected to besent back from the address at the transmission destination of therequest, such a problem cannot arise because the communicating party canbe identified by a set of addresses that include the port numbers ofboth communication end points. In the event that the address at thesource of transmission of a response packet does not match the addressat the transmission destination of a request packet under thesecircumstances, a security-related problem arises, namely thataddress-based packet filtering for refusing acceptance is no longercarried out.

Specifically, since there is the possibility that a data packet that hasbeen sent from an unknown address will be an authorized response to arequest packet, it is not filtered and cannot be discarded. This meansthat any packet whatsoever must be received.

With the aim of improving upon the increase in traffic and processingdelay that accompany name resolution in an DNS server, there is a methodof deciding, based upon past performance, which protocol should be usedto access a server in which IPv4 and IPv6 addresses have been registered(see the specification of Japanese Patent Laid-Open No. 2007-19612). Theprior art disclosed in Japanese Patent Laid-Open No. 2007-19612 mainlyassumes a situation in which IPv4 and IPv6 are mixed. It correlates andcaches an IP protocol, with which it was possible in the past tocommunicate with a server process attempting to be accessed, with theserver process and attempts to utilize this IP protocol and thecorresponding address the next time access is made. This prior art iseffective in reducing access to a DNS server and in reducing needlessaddress access tries in a case where the server process does not waitfor all protocol addresses that have been registered in the DNS server.

However, in a situation in which a response from a server process issent from an unknown address, caching itself is not carried out and theproblems set forth below cannot be solved even with the inventiondisclosed in Japanese Patent Laid-Open No. 2007-19612.

1. Basically, response data from an address other than an addressselected as a transmission destination must be received. That is, thereis a problem in terms of security, namely that address-based packetfiltering must be removed.2. With an application that performs communication using addresses ofboth the IPv4 and IPv6 protocols, the number of times the DNS server isqueried regarding name resolution increases. This increases traffic anddelays response time.3. In a case where a plurality of IPv6 addresses for a singlecommunication end point have been registered with a DNS server, there isthe possibility that packet transmission will be performed using all ofthe plurality of addresses. In other words, traffic increases.

SUMMARY OF INVENTION

The present invention solves the problems set forth above. To achievethis, the present invention provides a data communication apparatus forcommunicating, via a network, with a network device that can be assigneda plurality of addresses per one name, comprising: acquisition means foracquiring an address corresponding to a name of a transmissiondestination; transmission means for transmitting this transmission data,together with identification information that identifies thistransmission data, to the acquired address; reception means forreceiving response data having identification information correspondingto transmission data; determination means for determining, based uponthe identification information, whether the received response data is aresponse to the transmission data; and response processing means fordiscarding the response data if it has been determined that the responsedata is not a response to the transmission data, and delivering datacontained in the response data to a source requesting the datatransmission if it has been determined that the response data is aresponse to the transmission data.

An effect provided by the present invention is that an applicationsolves the problems mentioned above. Specifically, the security-relatedproblem, namely that address-based packet filtering must be removed, canbe solved. Further, an increase in traffic and a delay in response timecan be prevented even with an application that performs communicationusing addresses of both the IPv4 and IPv6 protocols. An increase intraffic can be suppressed even in a case where a plurality of IPv6addresses for a single communication end point have been registered in aDNS server.

Further features of the present invention will become apparent from thefollowing description of exemplary embodiments with reference to theattached drawings.

BRIEF DESCRIPTION OF DRAWINGS

FIG. 1 is a block diagram of a printer driver according to an embodimentof the present invention;

FIG. 2 is a block diagram illustrating the configuration of a personalcomputer according to the embodiment;

FIG. 3A is a diagram illustrating the relationship between communicationend points and a DNS server that handle IPv6 addresses;

FIG. 3B is a diagram illustrating the relationship among addresses usedamong a plurality of communication end points that handle IPv6addresses;

FIG. 4A is a flowchart illustrating data acquisition processing in theembodiment;

FIG. 4B is a flowchart illustrating request issuance processing in theembodiment;

FIG. 4C is a flowchart illustrating response acceptance processing inthe embodiment;

FIG. 5 is a flowchart illustrating transceive processing in theembodiment;

FIG. 6A is a flowchart illustrating communicating-party addressacquisition processing in the embodiment;

FIG. 6B is a flowchart illustrating communicating-party addressregistration processing in the embodiment;

FIG. 7A is a diagram illustrating the structure of request data in theembodiment; and

FIG. 7B is a diagram illustrating the structure of response data in theembodiment.

DESCRIPTION OF EMBODIMENTS

FIG. 2 is a block diagram illustrating the configuration of a personalcomputer serving as a data communication apparatus that operates uponloading an application program when the present invention is applied toa printer driver. The personal computer in which this printer driver hasbeen installed functions as a printing control apparatus for controllinga printer. The operating system of the personal computer is executed bya CPU 3 upon being stored in storage means which may be any of a RAM 4,hard-disk drive 5 or storage medium in a disk drive, described later.The operating system presents a display on a display unit 6 in responseto a request from the printer driver, accepts user inputs from an inputunit 7 and informs the printer driver of these inputs. The operatingsystem controls a communication unit 8, controls a peripheral device 9in addition to peripherals connected by the communication unit 8, inputsand outputs signals to and from the peripheral device and inputs andoutputs signals to and from the printer driver. Examples of peripheraldevices that can be controlled are a PC card, various disk drives, aprinter and a network card, etc. The operating system further provides afile system function. The file storage medium is not limited to thehard-disk drive 5 and RAM 4 in FIG. 2 but also encompasses an externalstorage device inclusive of another personal computer on a networkconnected via the communication unit 8. The operating system and printerdriver deliver and receive data to and from a group of hardware modulesinterconnected through system buses 1, 2 of the personal computer.

The printer driver accesses resources of the personal computer throughan application program interface (API) provided by the operating system,and uses the functions provided by the operating system. The printerdriver, which is loaded in the application program, is delivered printdata and translates the print data into a language that can beunderstood by the printer. This is the main processing performed by theprinter driver. In addition, the printer driver provides a function foracquiring and displaying for the user the status of such devices as astapling unit, stacker unit and paper tray with which the printer isequipped. The printer driver further provides a function for acquiringand displaying a list of jobs that have accumulated within the printerand that await printing.

The printer driver is executed by the CPU 3 upon being stored in storagemeans which may be any of a RAM 4, hard-disk drive 5 or storage mediumin a disk drive, described later. Further, the printer driver refers tofiles that have been stored in the file system provided by the operatingsystem. In the description below regarding the configuration andoperation of the printer driver, a detailed description of the functionrelating to the translation of print data will be excluded. The printerdriver according to this embodiment assumes that a device such asnetwork printer or copier is the network device of a communicating partydesignated by the user. A device such as a network printer or copierwill be referred to generically as a “printer” below. Described indetail below is a function for accessing the printer via a network,acquiring the model name of the printer, a list of functions with whichthe printer is equipped and a list of print jobs within the printer, anddisplaying this information on the display unit 6 shown in FIG. 2.

FIG. 1 is a block diagram illustrating the configuration of the printerdriver 10 according to the present invention. The printer driver 10translates data, which has been created by an application program or thelike, into a printer description language capable of being interpretedand executed by a user-designated printer, and transmits the translateddata to this printer. Although the data transmitted is generallyreferred to as transmission data, the term “print data” will be usedwith regard to the above-mentioned translated data sent to the printer.The printer driver 10 includes a display section 50, an input section60, access logic 20, a transport section 30 and driver logic 40. Threefunctional blocks that reside within the printer driver 10 will bedefined first.

The driver logic 40 is a functional block for designating the name ofthe printer to the access logic 20 and instructing the access logic toacquire information. The driver logic 40 executes processing fortranslating the print data in the printer driver 10 and displays ascreen on the display unit of the personal computer. The driver logic 40further controls printer selection means by which the user selects aprinter and specifying means for acquiring the functions of the printerselected, and causes information acquired from the printer to bedisplayed on a screen. Furthermore, the driver logic 40 executesprocessing for designating the name of the printer to the access logic20, described below, requesting acquisition of desired information andacquiring the result.

The access logic 20 is a block which executes processing for creatingrequest data based upon transmission data, designating the transmissiondestination of a request designated by a domain name or host name(namely an FQDN), and requesting the transport section 30 to performrequest transmission. Although the request transmission destination canbe designated not only by an FQDN but in the form of an IPv4 or IPv6(Internet Protocol version 6) binary address or computer name or thelike, the access logic 20 designates at least an FQDN.

The transport section 30 is a functional block for sending the requestedrequest data to the requested transmission destination, receiving theresponse to this request and delivering the response to the access logic20. Assume that the transport section 30 possesses no knowledgewhatsoever relating to the content of the request whose transmission hasbeen requested and the content of the response. Furthermore, thetransport section 30 queries the DNS server for the purpose ofspecifying the binary address of the transmission destination designatedby the FQDN.

The printer driver 10 accesses the DNS server that exists on thenetwork. The printer driver 10 designates to the DNS server the FQDN ofthe printer that is the target of communication of the printer driverand receives as the response the address that has been allocated to thisprinter.

The input section 60 receives the user input via the input unit 7 ofFIG. 2 and delivers the input to the driver logic 40. The FQDN of theprinter that is the communicating party and an address acquisition-startcommand are delivered as the input information. The display section 50executes processing for creating data to be displayed and for displayingthis data on the display unit 6 of FIG. 2. The displayed contentincludes information acquired from the printer, namely the model name ofthe printer, the list of equipped functions and the list of print jobswithin the printer.

The driver logic 40 delivers to the access logic 20 the FQDN of theprinter and the instruction to start address acquisition, these beingdelivered from the input section 60.

The access logic 20 includes a request ID generating section 201, astorage section 202 storing the relationship between a communicatingparty name and request ID, a storage section 203 storing therelationship between a request ID and a request, and a control section200. When the address acquisition-start instruction is applied, thecontrol section 200 sends the request ID generating section 201 arequest to generate a request ID. In response to the request from thecontrol section 200, the request ID generating section 201 generates aunique ID and sends back the ID. The request ID uses an ID that cyclesat a comparatively long period. As a result, the possibility that arequest ID identical with the request ID generated when a transmissionis made to a certain printer will be used at the same time as a separaterequest to the same apparatus or as a request to another printer is verysmall. Conversely, a period long enough so that the identical requestIDs will not be used in the same system is selected as the period of therequest ID. There is the possibility that a single request ID will beused over a maximum length of time equivalent to [number of addressesregistered in a DNS with regard to the host name (the printer in thisexample) of the transmission destination]×(response waitingtime)+(wake-up time from sleep)+(time required for response). If thislength of time is adopted as the maximum ID utilization time, then theuniqueness of the request ID will be maintained provided that therelation (period of request ID)>(maximum ID utilization time)/(averagetime interval at which transmission request is generated) is satisfied.

The control section 200 delivers the FQDN of the communicating party andthe request ID to the storage section 202, which stores these incorrelation with each other. The storage section 202 also has a functionwhich, when a request ID is designated, searches for the correlated FQDNand sends back the FQDN found. The control section 200 delivers therequest ID and request data to the storage section 203, which storesthese in correlation with each other. The storage section 203 also has afunction which, when a request ID is designated, searches for thecorrelated request data and sends back the request data found.

The control section 200, which controls the ID generating section 201,storage section 202, storage section 203 and transport section 30,acquires the necessary information from the printer of the communicatingparty.

The control section 200 is not concerned with the details of thepositions (addresses) of an externally located DNS server 70 and printer80 in the network. The control section 200 creates protocol data,referred to as request data, decided by agreement with the printer.Embedded in the protocol data is the request ID, which is a unique IDfor uniquely identifying the communicating party. The request data,which is the content of the transmission, and the name (FQDN) of thecommunicating party, which is the transmission destination, aredelivered from the control section 200 to the transport section 30 andthe latter is requested to perform transmission.

The transport section 30 includes a name resolution section 301, astorage section 304 storing the relationship between the name of acommunicating party and an address, a request transmission section 302and a response reception section 303. The request transmission section302 accepts request data and the name, i.e., FQDN, of the printer thatis the transmission destination, as inputs. The request transmissionsection 302 then requests the name resolution section 301 to convert thereceived FQDN to an address. The name resolution section 301 causes theaddress correlated with the FQDN delivered from the request transmissionsection 302 to be searched for by the storage section 304. If a relatedaddress is found, the name resolution section 301 delivers this addressto the request transmission section 302. The storage section 304essentially functions as the execution portion of the name resolutionsection 301 for retrieving the address from the FQDN and sending backthe address. The request transmission section 302 thus acquires theaddress (address of the communicating party) corresponding to the FQDNat the transmission destination. The address designated for nameresolution can be both an IPv4 address and an IPv6 address. With IPv6, aplurality of addresses can be assigned to a single name (FQDN), asmentioned earlier.

The request transmission section 302 uses the UDP (User DatagramProtocol) to transmit request data requested with respect to theacquired address of the communicating party. In a case where a pluralityof addresses have been returned from the name resolution section 301,processing is executed with regard to each address for resending therequest data if a response is not received upon elapse of a fixed periodof time following the transmission of the request data.

The response reception section 303 provides a function for receivingresponse data from the printer and delivering the response data to theaccess logic 20 as response data. The response reception section 303also acquires the address of the source of the transmission of theresponse data and delivers this address together with the response data.It should be noted that the printer transmits the response data usingUDP. The request is correlated by the request ID contained in a packet.

The packet structures of request data 701 and response data 702exchanged between the printer driver 10 and printer will be describedwith reference to FIGS. 7A and 7B. FIG. 7A illustrates the request data701, which is sent from the printer driver 10 to the printer. Therequest data 701 comprises a fixed-size packet header and avariable-length body. The packet header is the same for the responsedata 702 with regard to the arrangement of the fields. In the requestdata 701, however, a numerical value “0” signifying a request isdesignated in a “TYPE” field, whereas a numerical value “1” signifying aresponse is designated in the “TYPE” field of the packet header ofresponse data 702. The overall size (number of octets) of the requestdata 701 or 702 is contained in a “PACKET SIZE” field of the packetheader. The request ID, which has been designated on the side thatcreated by request data 701, is also contained in the correspondingresponse in the “ID” field. That is, the request ID contained in thecorresponding request data is written as is in the “ID” field of thepacket header of response data 702. The request body has a “COMMAND”field that designates the desired processing content to the receivingside. Requests such as a request for the model name of the apparatus, arequest for a list of functions with which the apparatus is equipped,and a request for a list of jobs within the apparatus are defined as thetypes of processing content designated in the “COMMAND” field. Aparameter decided for every command is designated in a “PARAMETER” fieldof the request body.

On the other hand, the response body has a “COMMAND” field indicatingprocessing content. The content of “COMMAND” contained in thecorresponding request data is stored in this field as is. A valuesignifying the result of execution of processing is contained in a“RESULT” field of the response body. Values signifying result ofprocessing, such as success, illegal parameter or error at execution,have been defined.

Processing executed by the access logic 20 and transport section 30 willbe described with reference to the flowcharts shown in FIGS. 4A to 6B.FIG. 4A is a flowchart illustrating processing for acquiring data from aprinter. This is the main function of the access logic 20.

At step S10, request issuance processing is executed for designating theprinter at the transmission destination and transmitting request data tothe designated printer. At step S20, response reception processing isexecuted for receiving response data from the designated printertogether with the address of the communicating party. At step S30, theFQDN, which is the transmission destination (communicating party) namedesignated together with the request data, and the address (IP address,for example) received together with the response data are delivered tothe transport section 30. As a result, the transport section 30 iscaused to correlate the name (FQDN) of the communicating party and theaddress.

The data acquisition processing of step S10 comprises the processing ofsteps S11 to S13, as shown in FIG. 4B. Step S11 is a request datacreation step of creating request data transmitted to the printer.Specifically, the processing of step S11 creates request data byembedding a request ID in a request packet. The request ID was generatedin the ID generating section 201 and is a unique request ID at least atthis point in time.

Step S12 is a correlation step of correlating the communicating partyand the request data. Here the communicating party is the name (FQDN) ofthe printer, and the content of the request data is copied to and storedin the storage section 203 of FIG. 1 until a response is received. Atstep S12, the request packet is correlated with the request ID andstored in the storage section 203.

At step S13, the created request data 701 is delivered to the transportsection 30 along with the name (FQDN) of the printer, which is thecommunicating party, and the transport section 30 is requested totransmit this information. At the same time that transmission isrequested, the name of the printer and the request ID are correlated andstored in the storage section 202.

It should be noted that the request data includes the request ID per se.This means that the name of the communicating party and the requestpacket may be correlated and stored at step S13 without storing therequest ID and request packet at step S12, by way of example. Requestdata having a specific request ID can be retrieved even if thisarrangement is adopted.

Next, the response reception processing at step S20 in FIG. 4A, namelyresponse processing, will be described. FIG. 4C is a flowchart showingthe details of the response acceptance processing. The responseacceptance processing comprises the processing of steps S21 to S23. StepS21 is a step of receiving the response data 702 from the transportsection 30. The access logic 20 periodically queries the transportsection 30 regarding arrival of the response data and accepts theresponse data if it is received. If the data has not yet been received,the access logic 20 queries, at regular intervals, the transport section30 about data arrival.

If data could be received, the address (IP address) of the source fromwhich the received data was transmitted is acquired simultaneously. Thisis information that the transport section 30 can acquire from theprotocol stack included with the operating system, although this will bedescribed later. Control then proceeds to step S22.

At step S22, the request ID is extracted from the packet header of theresponse data 702. By using the extracted request ID as a key, thestorage section 203 of FIG. 1 is queried and the request data correlatedwith the request ID is acquired. That is, the request ID of the responsepacket and the request IDs of requests transmitted in the past arecompared. This processing is processing for determining whether theresponse data 702 from the printer is an authorized response to therequest data 701 sent from the printer driver 10. The fact that requestdata having a request ID contained in response data has been stored iscorroboration that this response data has been sent back from thecorrect transmitting party. That is, it can be determined that theresponse data having the request ID of the transmitted request data hasa high probability of being an authorized response. Since the requestand response are correlated by a comparison of information, usually itis difficult to completely prevent a fake or erroneous response. Forthis reason, that a response is an authorized response is determinedusing the degree of probability. This is just as carried out in similarfashion in an ordinary request/response sequence. On the other hand,response data not having the request ID of the transmitted request datacan be determined to be a response that is not an authorized response.

If it is determined that a response is not an authorized response, thenthe response data is discarded without any further analysis of contentbeing performed. By virtue of this processing, a filtering function canbe implemented for detecting and discarding, to a certain extent, abogus packet from a malicious third party on the network. Next, thecontent of the response data is analyzed and delivered to the displaysection 50. The display section 50 creates display data and presentsthis display on the display unit 6 of FIG. 2.

Step S23 is a step of searching for the name of the communicating partybased upon the request ID. The request ID acquired at step S22 isdesignated and the name (FQDN) of the communicating party that has beencorrelated with the designated request ID is sent back to the storagesection 202. The FQDN obtained and the address of the source of thetransmission of the response data acquired at step S21 are sent back tothe source of the call and response acceptance processing is thenterminated.

At step S30, the FQDN of the printer acquired at step S20 and theaddress of the same printer are input and the function for correlatingthe name and address performed by the name resolution section 301 of thetransport section 30 is called. The name resolution section 301 executesthe processing of FIG. 6B. This will be described later. Thereafter, therequest data corresponding to the authorized response received and thecorresponding request ID are deleted from the storage section 203.Further, with regard to a request for which a correct response could notbe received, the corresponding request data and the correspondingrequest ID are similarly deleted from the storage section 203.

FIG. 5 and FIGS. 6A, 6B are flowcharts illustrating processing executedby the transport section 30. The transmit processing of FIG. 5 isprocessing executed by the transport section 30 as a result of thetransport section 30 being requested to transmit. This was describedabove as the processing by the access logic 20 at step S13 of FIG. 4B.The transmit processing of FIG. 5 has a step S50 and steps S60 to S67.Processing at step S50 for acquiring the address of the communicatingparty will be described as the detailed steps shown in FIG. 6A. At stepS50, the name of the printer constituting the communicating party isreceived as an input. In actuality, since it is necessary to convert thename of the communicating party to an address before the request istransmitted, an attempt is made to acquire a valid address by accessingeither or both the storage section 304, which stores the correlationbetween the name of the communicating party and the address, andexternal DNS server 70. These details will be described with referenceto FIG. 6A.

At step S51 in FIG. 6A, it is determined whether the name of thecommunicating party delivered as the input to the storage section 304 asstep S50 has already been registered as a key. If the name has alreadybeen registered, then the address that has been correlated with the nameof the communicating party is acquired from the storage section 304 andis sent back to the source of the call. The storage section 304 may alsobe referred to as a “cache”. If the name of the communicating party hasnot been registered, on the other hand, the DNS server 70 is requestedto perform name resolution at step S52. When the request is made,resolution is requested for both IPv4 and IPv6 addresses. In a casewhere a plurality of addresses are obtained, all of these are sent backto the source of the call in the form of a list (address list). In acase where the printer driver 10 accesses a certain printer for thefirst time, a “NO” decision is rendered at step S51 and the DNS server70 executes name resolution. It should be noted that the “cache”mentioned at step S53 does not cache the result of name resolution bythe DNS server 70 as is. What is held in the cache, namely the storagesection 304, is information that has been input by processing forregistering a communicating party address shown in FIG. 6B, describedlater.

After the address of the printer constituting the communicating party isacquired at step S50, processing for request transmission and responsereception is executed from step S60 onward in FIG. 5. The transceiveprocessing of FIG. 5 essentially involves transmitting a request packetto the address of the communicating party acquired and then verifyingthat a response is received following a stipulated response waitingtime. In a case where a plurality of packets are acquired, one of themis selected and is transmitted to the selected address. If there is noresponse within the stipulated period of time, then, while repeatingresend a stipulated number of times (two times, for example) with regardto one address, all of the addresses acquired at step S50 are tried.These attempts are aborted when a response cannot be received eventhough the request has been transmitted to all of the addresses obtainedby name resolution.

Transceive processing will now be described step by step. At step S60 inFIG. 5, it is determined whether an address that has not yet been dealtwith exists in the address list of communicating parties acquired atstep S50. That is, the processing at step S60 includes incrementing anindex, which points to an address, from the top of the address list anddetermining whether an address exists at the point to which the indexhas been incremented. If there is an address that has not yet been dealtwith, then it is determined that there is an address capable of beingacquired next. If the tail end of the address list has already beenreached, a “NO” decision is rendered at step S60 and processing isexited because processing cannot continue further. There can be twocases when the decision rendered at step S60 the first time is “NO”,namely a case where the name of the printer constituting thecommunicating party has not been registered in the DNS server and a casewhere a response has not been sent back within the stipulated period oftime because the printer power source is off or because the printer isoffline, by way of example. In a case where there is a next address,this address is adopted as an address of interest. At this time acounter for counting the number of transmissions is returned to aninitial value of, for example, zero. Control then proceeds to step S61.Here it is determined whether the prescribed number of transmissiontries has been exceeded for every address. That is, if the count valuehas exceeded the prescribed number, then control returns to step S60 andan attempt is made to acquire the next address.

If a “NO” decision is rendered at step S61, then processing fortransmitting the request data is executed at step S62. Step S61 isprocessing executed by the request transmission section 302 of thetransport section 30. At step S61, the request data acquired from theaccess logic 20 is transmitted to the address adopted as the object ofinterest at step S60.

Next, at step S63, the system waits for a response only for theprescribed response waiting time (five seconds, for example). In a casewhere the printer was in the sleeping state, the response waiting timeis stipulated upon adding time needed for wake-up and time needed torespond after wake-up.

At step S64, an attempt is made to receive response data from theprinter. Specifically, a reception-data acquisition function provided bythe protocol stack included in the operating system is called andwhether the data has arrived is verified.

At step S65, it is determined whether reception data has been receivedby the result of executing step S64. If a “NO” decision is rendered,control proceeds to step S67, the number of transmissions is incrementedand control returns to step S61. If a “YES” decision is rendered at stepS65, on the other hand, then there is a high likelihood that a responsecorresponding to the request transmitted from the printer has beenreceived. If a “YES” decision is rendered at step S65, therefore, thenit is determined that a response to the request has been received. Atstep S66, the reception data is created as information for delivery tothe access logic 20, which is the source of the transmission request.For example, this information includes the received response data andthe address of the printer that transmitted this response data.

Next, the processing of FIG. 6B for registering the address of acommunicating party will be described. This processing is processingexecuted as a result of the access logic 20 calling the name—addresscorrelating function of the name resolution section 301 of transportsection 30 at step S30 in FIG. 4A. A set consisting of the FQDN of theprinter and the address thereof is applied as an input to the processingof FIG. 6B for registering the address of a communicating party. ThisFQDN and address are correlated and stored at step S71. The FQDN and theaddress that have been stored in the storage section 304 are consultedas the cache of the address. It is desirable, therefore, to delete arecord (the pair composed of the FQDN and address) of the cache forwhich non-consultation time has exceeded a fixed period of time. This isbecause there is a possibility that the address has been updated andbecause storage capacity is limited. Further, in a case also where arequest is transmitted to a cached address and no response is received,it is preferred that this record be deleted. An address that isregistered is the transmission-destination address of a request forwhich a normal response has been returned. In addition, it may also bethe address of the source that transmitted a normal response, by way ofexample.

By virtue of the above-described procedure, the name (FQDN) of thetransmission destination and the identification information (request ID)appended to the packet are correlated, thereby enabling the receivedresponse to be identified as a response that corresponds to the requesttransmitted. As a result, filtering processing for discarding responsesother than the identified response can be implemented.

Furthermore, IPv4 and IPv6 addresses can be acquired in single-timefashion and it is possible to reduce the number of times name resolutionis performed and to shorten the required time.

Further, by caching an address for which communication succeeded incorrelation with the name (FQDN) of the transmission destination, thenumber of times packet transmission is tried can be reduced even in acase where a plurality of addresses have been registered in IPv6 DNSserver. Network traffic can be reduced as a result.

Although this embodiment has been described taking as an example a casewhere a printer driver transmits print data, namely request data, to aprinter, it is possible to apply the invention to data transmission ingeneral. That is, the invention involving this embodiment can be appliedto another application program or system program rather than to theprinter driver 10. In this case the access logic 20 and transportsection 30 would function in a manner similar to this embodiment withrespect to the alternative application program or system program.

Further, this embodiment has been described in a form in which theaccess logic 20 and transport section 30 are contained in the printerdriver. However, the access logic 20 and transport section 30 may beplaced outside the printer driver and may be called by a suitableinterface, such as a function calling interface, with the driver logic40. If such an arrangement is adopted, the access logic 20 and transportsection 30 can be utilized by describing the interface with the accesslogic 20 and transport section 30 in the desired program.

Further, the ID contained in the request packet, namely the transmissiondata, is a code generated in cyclic fashion. However, any code thatuniquely identifies a packet, such as a point in time or a combinationof a transmission-source address and point in time, will suffice.

Further, in this embodiment, the fact that a response is a normalresponse is determined using only an ID as the identificationinformation in a case where request data having a request ID identicalwith the response data has been stored. However, the contents of datamay be compared. For example, fields having values common to acorresponding request and response, such as the commands shown in FIGS.7A and 7B, may be compared and a response may be determined to be anauthorized response if the compared fields match. That is, in this casea response is determined to be an authorized response using the commonfields of the request and response in addition to the ID as theidentification information.

The present invention can be applied to a system constituted by aplurality of devices (for example, a host computer, interface, reader,printer and the like) or to an apparatus comprising a single device (forexample, a copier or facsimile machine or the like).

The process steps of the present invention can also be implemented byhaving a processing apparatus (a CPU or processor) such as a personalcomputer execute software (a program) that has been acquired via anetwork or various storage media.

Other Embodiments

Aspects of the present invention can also be realized by a computer of asystem or apparatus (or devices such as a CPU or MPU) that reads out andexecutes a program recorded on a memory device to perform the functionsof the above-described embodiment(s), and by a method, the steps ofwhich are performed by a computer of a system or apparatus by, forexample, reading out and executing a program recorded on a memory deviceto perform the functions of the above-described embodiment(s). For thispurpose, the program is provided to the computer for example via anetwork or from a recording medium of various types serving as thememory device (e.g., computer-readable medium).

While the present invention has been described with reference toexemplary embodiments, it is to be understood that the invention is notlimited to the disclosed exemplary embodiments. The scope of thefollowing claims is to be accorded the broadest interpretation so as toencompass all such modifications and equivalent structures andfunctions.

This application claims the benefit of Japanese Patent Application No.2009-117049, filed May 13, 2009, which is hereby incorporated byreference herein in its entirety.

1.-9. (canceled)
 10. A data communication apparatus connectable with anetwork device to which a plurality of addresses has been assigned,comprising: an acquisition unit constructed to send a name of a networkdevice to a DNS server and acquire a plurality of addresses associatedwith the name from the DNS server; a transmission unit constructed todetermine one of the plurality of addresses as a destination address andtransmit a request data with identification information to thedestination address; a reception unit constructed to receive a responsedata and a source address of the response data from the network device,wherein the response data contains identification information and thesource address of the response data is different than the destinationaddress of the request data; and a storage unit constructed to associatethe name of the network device with the source address of the responsedata and store the associated name and source address when theidentification information transmitted by the transmission unit isidentical to the identification information received by the receptionunit, wherein the transmission unit is constructed to determine thesource address associated with the name of the network device stored bythe storage unit as a destination address and transmit a request data tothe destination address when transmitting a request data to the networkdevice next time.
 11. The apparatus according to claim 10, furthercomprising: a response processing unit constructed to discard theresponse data when the identification information transmitted by thetransmission unit is not identical to the identification informationreceived by the reception unit, and deliver a data contained in theresponse data to a requesting source when the identification informationtransmitted by the transmission unit is identical to the identificationinformation received by the reception unit.
 12. The apparatus accordingto claim 10, wherein the plurality of addresses assigned to the networkdevice meet IPv6.
 13. A data communication apparatus connectable with anetwork device to which a plurality of addresses has been assigned,comprising: a transmission unit constructed to determine one of theplurality of addresses as a destination address and transmit a requestdata with identification information to the destination address; areception unit constructed to receive a response data and a sourceaddress of the response data from the network device, wherein theresponse data contains identification information and the source addressof the response data is different than the destination address of therequest data; and a storage unit constructed to associate the name ofthe network device with the source address of the response data andstore the associated name and source address of the response data whenthe identification information transmitted by the transmission unit isidentical to the identification information received by the receptionunit, wherein the transmission unit is constructed to determine thesource address associated with the name of the network device stored bythe storage unit as a destination address and transmit a request data tothe destination address when transmitting a request data to the networkdevice next time.
 14. The apparatus according to claim 13, furthercomprising: a response processing unit constructed to discard theresponse data when the identification information transmitted by thetransmission unit is not identical to the identification informationreceived by the reception unit, and deliver a data contained in theresponse data to a requesting source when the identification informationtransmitted by the transmission unit is identical to the identificationinformation received by the reception unit.
 15. The apparatus accordingto claim 13, wherein the plurality of addresses assigned to the networkdevice meet IPv6.
 16. The apparatus according to claim 13, wherein thetransmission unit is constructed to select an address included in theplurality of addresses according to an address selection algorithm anddetermine the selected address as the destination address.
 17. A methodfor a data communication apparatus connectable with a network device towhich a plurality of addresses has been assigned, comprising: anacquisition step of sending a name of a network device to a DNS serverand acquire a plurality of addresses associated with the name from theDNS server; a transmission step of determining one of the plurality ofaddresses as a destination address and a request data withidentification information to the destination address; a reception stepof receiving a response data and a source address of the response datafrom the network device, wherein the response data containsidentification information and the source address of the response datais different than the destination address of the request data; and astorage step of associating the name of the network device with thesource address of the response data and storing the associated name andsource address when the identification information transmitted by thetransmission step is identical to the identification informationreceived by the reception step, wherein the transmission step determinesthe source address associated with the name of the network device storedby the storage step as a destination address and transmits a requestdata to the destination address when transmitting a request data to thenetwork device next time.
 18. The method according to claim 17, furthercomprising: a response processing step of discarding the response datawhen the identification information transmitted by the transmission stepis not identical to the identification information received by thereception step, and delivering a data contained in the response data toa requesting source when the identification information transmitted bythe transmission step is identical to the identification informationreceived by the reception step.
 19. The method according to claim 17,wherein the plurality of addresses assigned to the network device meetIPv6.
 20. A method for data communication apparatus connectable with anetwork device to which a plurality of addresses has been assigned,comprising: a transmission step of determining one of the plurality ofaddresses as a destination address and transmitting a request data withidentification information to the destination address; a reception stepof receiving a response data and a source address of the response datafrom the network device, wherein the response data containsidentification information and the source address of the response datais different than the destination address of the request data; and astorage step of associating the name of the network device with thesource address of the response data and storing the associated name andsource address when the identification information transmitted by thetransmission step is identical to the identification informationreceived by the reception step, wherein the transmission step determinesthe source address associated with the name of the network device storedby the storage step as a destination address and transmit a request datato the destination address when transmitting a request data to thenetwork device next time.
 21. The method according to claim 20, furthercomprising: a response processing step of discarding the response datawhen the identification information transmitted by the transmission stepis not identical to the identification information received by thereception step, and delivering a data contained in the response data toa requesting source when the identification information transmitted bythe transmission step is identical to the identification informationreceived by the reception step.
 22. The method according to claim 20,wherein the plurality of addresses assigned to the network device meetIPv6.
 23. The method according to claim 20, wherein the transmissionstep selects an address included in the plurality of addresses accordingto an address selection algorithm and determines the selected address asthe destination address.
 24. A non-transitory computer readable storagemedium on which is stored a computer program for a data communicationapparatus connectable with a network device to which a plurality ofaddresses has been assigned, comprising: an acquisition step of sendinga name of a network device to a DNS server and acquire a plurality ofaddresses associated with the name from the DNS server; a transmissionstep of determining one of the plurality of addresses as a destinationaddress and a request data with identification information to thedestination address; a reception step of receiving a response data and asource address of the response data from the network device, wherein theresponse data contains identification information and the source addressof the response data is different than the destination address of therequest data; and a storage step of associating the name of the networkdevice with the source address of the response data and storing theassociated name and source address when the identification informationtransmitted by the transmission step is identical to the identificationinformation received by the reception step, wherein the transmissionstep determines the source address associated with the name of thenetwork device stored by the storage step as a destination address andtransmits a request data to the destination address when transmitting arequest data to the network device next time.
 25. The non-transitorycomputer readable storage medium according to claim 24, furthercomprising: a response processing step of discarding the response datawhen the identification information transmitted by the transmission stepis not identical to the identification information received by thereception step, and delivering a data contained in the response data toa requesting source when the identification information transmitted bythe transmission step is identical to the identification informationreceived by the reception step.
 26. The non-transitory computer readablestorage medium according to claim 24, wherein the plurality of addressesassigned to the network device meet IPv6.
 27. A non-transitory computerreadable storage medium on which is stored a computer program for a datacommunication apparatus connectable with a network device to which aplurality of addresses has been assigned, comprising: a transmissionstep of determining one of the plurality of addresses as a destinationaddress and transmitting a request data with identification informationto the destination address; a reception step of receiving a responsedata and a source address of the response data from the network device,wherein the response data contains identification information and thesource address of the response data is different than the destinationaddress of the request data; and a storage step of associating the nameof the network device with the source address of the response data andstoring the associated name and source address when the identificationinformation transmitted by the transmission step is identical to theidentification information received by the reception step, wherein thetransmission step determines the source address associated with the nameof the network device stored by the storage step as a destinationaddress and transmit a request data to the destination address whentransmitting a request data to the network device next time.
 28. Thenon-transitory computer readable storage medium according to claim 27,further comprising: a response processing step of discarding theresponse data when the identification information transmitted by thetransmission step is not identical to the identification informationreceived by the reception step, and delivering a data contained in theresponse data to a requesting source when the identification informationtransmitted by the transmission step is identical to the identificationinformation received by the reception step.
 29. The non-transitorycomputer readable storage medium according to claim 27, wherein theplurality of addresses assigned to the network device meet IPv6.
 30. Thenon-transitory computer readable storage medium according to claim 27,wherein the transmission step selects an address included in theplurality of addresses according to an address selection algorithm anddetermines the selected address as the destination address.